package cn.iocoder.yudao.module.reading.controller.app.community.vo.comment;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
 * 社区评论创建 Request VO
 *
 * @author 芋道源码
 */
@Schema(description = "用户 APP - 社区评论创建 Request VO")
@Data
public class CommentCreateReqVO {

    @Schema(description = "帖子ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "帖子ID不能为空")
    private Long postId;

    @Schema(description = "父评论ID", example = "1")
    private Long parentId;

    @Schema(description = "评论内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "这本书真的很不错！")
    @NotEmpty(message = "评论内容不能为空")
    @Size(max = 300, message = "评论内容长度不能超过300个字符")
    private String content;

}
